/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __MAP_TILE_H__
#define __MAP_TILE_H__

#include "AdtFile.h"
#include "MapChunk.h"

namespace PQGame
{
	class MapTile
	{
	public:
		static const int CHUNKS_PER_ROW=16;
		static const int CHUNKS_PER_COL=16;
		/*
		@param index The world map index
		@param col The world map chunk col
		@param row The world map chunk row
		*/
		MapTile(int index,int col,int row);

		inline int col()
		{
			return _col;
		}

		inline int row()
		{
			return _row;
		}

		float* getHeights()
		{
			return _heights;
		}

	private:
		AdtFile* _file;//data file
		int _index;
		int _col;
		int _row;

		MapChunk* _chunks[CHUNKS_PER_ROW*CHUNKS_PER_COL];
		float _heights[16*16*9*9];

	};

	typedef std::vector<MapTile*> MapTileVector;
}

#endif
